/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "AreaScope.h"

namespace oai::udr::model {

AreaScope::AreaScope() {
  m_EutraCellIdListIsSet = false;
  m_NrCellIdListIsSet = false;
  m_TacListIsSet = false;
  m_TacInfoPerPlmnIsSet = false;
}

AreaScope::~AreaScope() {}

void AreaScope::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const AreaScope &o) {
  j = nlohmann::json();
  if (o.eutraCellIdListIsSet() || !o.m_EutraCellIdList.empty())
    j["eutraCellIdList"] = o.m_EutraCellIdList;
  if (o.nrCellIdListIsSet() || !o.m_NrCellIdList.empty())
    j["nrCellIdList"] = o.m_NrCellIdList;
  if (o.tacListIsSet() || !o.m_TacList.empty())
    j["tacList"] = o.m_TacList;
  if (o.tacInfoPerPlmnIsSet() || !o.m_TacInfoPerPlmn.empty())
    j["tacInfoPerPlmn"] = o.m_TacInfoPerPlmn;
}

void from_json(const nlohmann::json &j, AreaScope &o) {
  if (j.find("eutraCellIdList") != j.end()) {
    j.at("eutraCellIdList").get_to(o.m_EutraCellIdList);
    o.m_EutraCellIdListIsSet = true;
  }
  if (j.find("nrCellIdList") != j.end()) {
    j.at("nrCellIdList").get_to(o.m_NrCellIdList);
    o.m_NrCellIdListIsSet = true;
  }
  if (j.find("tacList") != j.end()) {
    j.at("tacList").get_to(o.m_TacList);
    o.m_TacListIsSet = true;
  }
  if (j.find("tacInfoPerPlmn") != j.end()) {
    j.at("tacInfoPerPlmn").get_to(o.m_TacInfoPerPlmn);
    o.m_TacInfoPerPlmnIsSet = true;
  }
}

std::vector<std::string> &AreaScope::getEutraCellIdList() {
  return m_EutraCellIdList;
}
void AreaScope::setEutraCellIdList(std::vector<std::string> const &value) {
  m_EutraCellIdList = value;
  m_EutraCellIdListIsSet = true;
}
bool AreaScope::eutraCellIdListIsSet() const { return m_EutraCellIdListIsSet; }
void AreaScope::unsetEutraCellIdList() { m_EutraCellIdListIsSet = false; }
std::vector<std::string> &AreaScope::getNrCellIdList() {
  return m_NrCellIdList;
}
void AreaScope::setNrCellIdList(std::vector<std::string> const &value) {
  m_NrCellIdList = value;
  m_NrCellIdListIsSet = true;
}
bool AreaScope::nrCellIdListIsSet() const { return m_NrCellIdListIsSet; }
void AreaScope::unsetNrCellIdList() { m_NrCellIdListIsSet = false; }
std::vector<std::string> &AreaScope::getTacList() { return m_TacList; }
void AreaScope::setTacList(std::vector<std::string> const &value) {
  m_TacList = value;
  m_TacListIsSet = true;
}
bool AreaScope::tacListIsSet() const { return m_TacListIsSet; }
void AreaScope::unsetTacList() { m_TacListIsSet = false; }
std::map<std::string, TacInfo> &AreaScope::getTacInfoPerPlmn() {
  return m_TacInfoPerPlmn;
}
void AreaScope::setTacInfoPerPlmn(std::map<std::string, TacInfo> const &value) {
  m_TacInfoPerPlmn = value;
  m_TacInfoPerPlmnIsSet = true;
}
bool AreaScope::tacInfoPerPlmnIsSet() const { return m_TacInfoPerPlmnIsSet; }
void AreaScope::unsetTacInfoPerPlmn() { m_TacInfoPerPlmnIsSet = false; }

} // namespace oai::udr::model
